package com.smart.enums;

/**
 * 特殊核销类型枚举
 */
public enum EcpSpecialUseTypeEnum {
    VIP("VIP","免费洗车"),
    TWICE("TWICE","二次洗车");

    private String code;
    private String name;
    EcpSpecialUseTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (EcpSpecialUseTypeEnum obj : EcpSpecialUseTypeEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
